package top.fyukina.fymil.internal.exps;

import org.dom4j.Element;
import top.fyukina.fymil.DataType;
import top.fyukina.fymil.elements.Environment;

public class Of implements Expression<Object> {
    @Override
    public String registerName() {
        return "of";
    }
    @Override
    public Object parse(Element exp, Environment env) {
        String id = exp.attributeValue("id");
        return id == null ? DataType.getDefaultNonType() :
                env.var().getVar(id);
    }
}